$(function(){
    $('#display-player-menu').click(function(){
       setLoading();
        $('#player-menu').dialog({modal: true, autoOpen:true, resizable: false, minHeight: 400, minWidth: 600});
        $('#player-menu').load('/player/menu', function(){
            $('#player-menu-accordion').accordion({
                        autoHeight: false,
                        collapsible: true,
			navigation: true});
            removeLoading();
            $('#switch-actual-character').change(function(){
               setLoading();
               $('#actual-character').load('/joueur/switch/ajax/'+$('#switch-actual-character').val(), function(){
                   removeLoading();
               });});
            });
     return false;
    });
});
